\(\int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx\) [372]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 28, antiderivative size = 63 \[ \int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=-\frac {\left (\frac {a}{c^2}+\frac {b}{d^2}\right ) x}{\sqrt {-c+d x} \sqrt {c+d x}}+\frac {2 b \text {arctanh}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d^3} \]

[Out]

2*b*arctanh((d*x-c)^(1/2)/(d*x+c)^(1/2))/d^3-(a/c^2+b/d^2)*x/(d*x-c)^(1/2)/(d*x+c)^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {394, 65, 223, 212} \[ \int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\frac {2 b \text {arctanh}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{d^3}-\frac {x \left (\frac {a}{c^2}+\frac {b}{d^2}\right )}{\sqrt {d x-c} \sqrt {c+d x}} \]

[In]

Int[(a + b*x^2)/((-c + d*x)^(3/2)*(c + d*x)^(3/2)),x]

[Out]

-(((a/c^2 + b/d^2)*x)/(Sqrt[-c + d*x]*Sqrt[c + d*x])) + (2*b*ArcTanh[Sqrt[-c + d*x]/Sqrt[c + d*x]])/d^3

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 394

Int[((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symb
ol] :> Simp[(-(b1*b2*c - a1*a2*d))*x*(a1 + b1*x^(n/2))^(p + 1)*((a2 + b2*x^(n/2))^(p + 1)/(a1*a2*b1*b2*n*(p +
1))), x] - Dist[(a1*a2*d - b1*b2*c*(n*(p + 1) + 1))/(a1*a2*b1*b2*n*(p + 1)), Int[(a1 + b1*x^(n/2))^(p + 1)*(a2
 + b2*x^(n/2))^(p + 1), x], x] /; FreeQ[{a1, b1, a2, b2, c, d, n}, x] && EqQ[non2, n/2] && EqQ[a2*b1 + a1*b2,
0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rubi steps \begin{align*} \text {integral}& = -\frac {\left (\frac {a}{c^2}+\frac {b}{d^2}\right ) x}{\sqrt {-c+d x} \sqrt {c+d x}}+\frac {b \int \frac {1}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx}{d^2} \\ & = -\frac {\left (\frac {a}{c^2}+\frac {b}{d^2}\right ) x}{\sqrt {-c+d x} \sqrt {c+d x}}+\frac {(2 b) \text {Subst}\left (\int \frac {1}{\sqrt {2 c+x^2}} \, dx,x,\sqrt {-c+d x}\right )}{d^3} \\ & = -\frac {\left (\frac {a}{c^2}+\frac {b}{d^2}\right ) x}{\sqrt {-c+d x} \sqrt {c+d x}}+\frac {(2 b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d^3} \\ & = -\frac {\left (\frac {a}{c^2}+\frac {b}{d^2}\right ) x}{\sqrt {-c+d x} \sqrt {c+d x}}+\frac {2 b \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.13 \[ \int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\frac {-\frac {2 \left (b c^2 d+a d^3\right ) x}{c^2 \sqrt {-c+d x} \sqrt {c+d x}}+4 b \text {arctanh}\left (\frac {\sqrt {c+d x}}{\sqrt {-c+d x}}\right )}{2 d^3} \]

[In]

Integrate[(a + b*x^2)/((-c + d*x)^(3/2)*(c + d*x)^(3/2)),x]

[Out]

((-2*(b*c^2*d + a*d^3)*x)/(c^2*Sqrt[-c + d*x]*Sqrt[c + d*x]) + 4*b*ArcTanh[Sqrt[c + d*x]/Sqrt[-c + d*x]])/(2*d
^3)

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 4.07 (sec) , antiderivative size = 166, normalized size of antiderivative = 2.63

method result size
default \(\frac {\sqrt {d x -c}\, \left (-\ln \left (\left (\sqrt {-\left (d x +c \right ) \left (-d x +c \right )}\, \operatorname {csgn}\left (d \right )+d x \right ) \operatorname {csgn}\left (d \right )\right ) b \,c^{2} d^{2} x^{2}+\sqrt {d^{2} x^{2}-c^{2}}\, \operatorname {csgn}\left (d \right ) d^{3} a x +\sqrt {d^{2} x^{2}-c^{2}}\, \operatorname {csgn}\left (d \right ) d b \,c^{2} x +\ln \left (\left (\sqrt {-\left (d x +c \right ) \left (-d x +c \right )}\, \operatorname {csgn}\left (d \right )+d x \right ) \operatorname {csgn}\left (d \right )\right ) b \,c^{4}\right ) \operatorname {csgn}\left (d \right )}{\left (-d x +c \right ) \sqrt {d^{2} x^{2}-c^{2}}\, c^{2} d^{3} \sqrt {d x +c}}\) \(166\)

[In]

int((b*x^2+a)/(d*x-c)^(3/2)/(d*x+c)^(3/2),x,method=_RETURNVERBOSE)

[Out]

(d*x-c)^(1/2)*(-ln(((-(d*x+c)*(-d*x+c))^(1/2)*csgn(d)+d*x)*csgn(d))*b*c^2*d^2*x^2+(d^2*x^2-c^2)^(1/2)*csgn(d)*
d^3*a*x+(d^2*x^2-c^2)^(1/2)*csgn(d)*d*b*c^2*x+ln(((-(d*x+c)*(-d*x+c))^(1/2)*csgn(d)+d*x)*csgn(d))*b*c^4)*csgn(
d)/(-d*x+c)/(d^2*x^2-c^2)^(1/2)/c^2/d^3/(d*x+c)^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 129 vs. \(2 (55) = 110\).

Time = 0.26 (sec) , antiderivative size = 129, normalized size of antiderivative = 2.05 \[ \int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\frac {b c^{4} + a c^{2} d^{2} - {\left (b c^{2} d + a d^{3}\right )} \sqrt {d x + c} \sqrt {d x - c} x - {\left (b c^{2} d^{2} + a d^{4}\right )} x^{2} - {\left (b c^{2} d^{2} x^{2} - b c^{4}\right )} \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right )}{c^{2} d^{5} x^{2} - c^{4} d^{3}} \]

[In]

integrate((b*x^2+a)/(d*x-c)^(3/2)/(d*x+c)^(3/2),x, algorithm="fricas")

[Out]

(b*c^4 + a*c^2*d^2 - (b*c^2*d + a*d^3)*sqrt(d*x + c)*sqrt(d*x - c)*x - (b*c^2*d^2 + a*d^4)*x^2 - (b*c^2*d^2*x^
2 - b*c^4)*log(-d*x + sqrt(d*x + c)*sqrt(d*x - c)))/(c^2*d^5*x^2 - c^4*d^3)

Sympy [F(-1)]

Timed out. \[ \int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\text {Timed out} \]

[In]

integrate((b*x**2+a)/(d*x-c)**(3/2)/(d*x+c)**(3/2),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.21 \[ \int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=-\frac {a x}{\sqrt {d^{2} x^{2} - c^{2}} c^{2}} - \frac {b x}{\sqrt {d^{2} x^{2} - c^{2}} d^{2}} + \frac {b \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{d^{3}} \]

[In]

integrate((b*x^2+a)/(d*x-c)^(3/2)/(d*x+c)^(3/2),x, algorithm="maxima")

[Out]

-a*x/(sqrt(d^2*x^2 - c^2)*c^2) - b*x/(sqrt(d^2*x^2 - c^2)*d^2) + b*log(2*d^2*x + 2*sqrt(d^2*x^2 - c^2)*d)/d^3

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 113 vs. \(2 (55) = 110\).

Time = 0.30 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.79 \[ \int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=-\frac {b \log \left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}\right )}{d^{3}} - \frac {2 \, {\left (b c^{2} + a d^{2}\right )}}{{\left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2} + 2 \, c\right )} c d^{3}} - \frac {{\left (b c^{2} d^{3} + a d^{5}\right )} \sqrt {d x + c}}{2 \, \sqrt {d x - c} c^{2} d^{6}} \]

[In]

integrate((b*x^2+a)/(d*x-c)^(3/2)/(d*x+c)^(3/2),x, algorithm="giac")

[Out]

-b*log((sqrt(d*x + c) - sqrt(d*x - c))^2)/d^3 - 2*(b*c^2 + a*d^2)/(((sqrt(d*x + c) - sqrt(d*x - c))^2 + 2*c)*c
*d^3) - 1/2*(b*c^2*d^3 + a*d^5)*sqrt(d*x + c)/(sqrt(d*x - c)*c^2*d^6)

Mupad [F(-1)]

Timed out. \[ \int \frac {a+b x^2}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\int \frac {b\,x^2+a}{{\left (c+d\,x\right )}^{3/2}\,{\left (d\,x-c\right )}^{3/2}} \,d x \]

[In]

int((a + b*x^2)/((c + d*x)^(3/2)*(d*x - c)^(3/2)),x)

[Out]

int((a + b*x^2)/((c + d*x)^(3/2)*(d*x - c)^(3/2)), x)